<?php
/**
 * @author ykm 2018/12/7
 * @describe 京东供应商平台
 */
class erpapi_shop_matrix_jd_request_delivery extends erpapi_shop_request_delivery
{
   /* public function logistics_update($sdf)
    {
        $title = '京东供应商平台出库';
        $params = array();
        $params['tid'] = $sdf['orderinfo']['order_bn'];
        $params['memo_by_vendor'] = $sdf['memo'];
        $params['is_jdexpress'] = $sdf['logi_type'] == '360buy' ? 1 : 2; #  是否是京东配送：1是，2否
        $rsp = $this->__caller->call(SHOP_OUT_BRANCH,$params, array(),$title,10,$params['tid']);
        return $rsp;
    }
    */
    /**
     * 京东供应商平台出库
     *
     * @return void
     * @author 
     **/
    public function add($sdf)
    {
       
        $title = '京东供应商平台出库';
        $params = array();
        $params['tid'] = $sdf['orderinfo']['order_bn'];
        $params['memo_by_vendor'] = $sdf['memo'];
        $params['is_jdexpress'] = $sdf['logi_type'] == '360buy' ? 1 : 2; #  是否是京东配送：1是，2否
        $rsp = $this->__caller->call(SHOP_OUT_BRANCH,$params, array(),$title,10,$params['tid']);
        return $rsp;
    }


    protected function get_confirm_params($sdf)
    {
        $param = parent::get_confirm_params($sdf);
        $param['estimate_date'] = date('Y-m-d H:i:s', (($sdf['delivery_time'] ? $sdf['delivery_time'] : time()) + 3 * 86400));
        return $param;
    }


}
